<?php
	$tempo = $_GET["tempo"];
	$roomID = $_GET["roomName"];
	$studentID = $_GET["studentID"];

	$con = mysql_connect("localhost","root","");
	if (!$con) {
		die('Could not connect: ' . mysql_error());
	}
	mysql_select_db("ciu196", $con);
	
	$sql = "
	UPDATE StudentsInRooms
	SET tempo = '$tempo'
	WHERE roomID = '$roomID' AND studentID = '$studentID';
	";
	
	$res = mysql_query($sql,$con);	
	if(!$res) {
		die('Error in changing the tempo ' . mysql_error());
	} else {
		echo "User changed tempo";
	}
	
	mysql_close();
?>